<template>
 <!-- 晨会看板 -->
  <div class="board-content">
    <board-title title="发展" bgclass="bg-fz">
      <img slot="flagImg" class="flag-img" src="~@/assets/imgs/publicline/board/flag_fz.png" />
    </board-title>
    <day-advance ref="dayAdvanceRef" v-show="flag" />
    <month-advance ref="monthAdvanceRef" v-show="!flag" />
  </div>
</template>

<script>
import boardTitle from '@/views/components/publicline/board/title.vue'
import dayAdvance from '@/views/components/publicline/board/dayAdvance.vue'
import monthAdvance from '@/views/components/publicline/board/monthAdvance.vue'

export default {
  components: { boardTitle, dayAdvance, monthAdvance },
  props: {
    flag: {
      type: Boolean,
      require: false,
      default: true
    }
  },
  methods: {
    getMorningAdvance(params) {
      if(this.flag) {
        this.$refs.dayAdvanceRef.getMorningDayAdvance(params)
      }
      if(!this.flag) {
        this.$refs.monthAdvanceRef.getMorningMonthAdvance(params)
      }
    },
  }
}
</script>
<style lang="less" scoped>
/deep/ .board-fz-info {
  background: #fff;
  padding: 0 16px;
  .board-fz-item {
    width: 50%;
    text-align: center;
    background-image: url('~@/assets/imgs/publicline/board/bg-card-fz.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding: 16px 0;
    display: inline-block;
    margin-bottom: 12px;
    .sub-title {
      font-size: 12px;
      color: #666;
      margin-top: 6px;
    }
    .value {
      font-size: 24px;
      color: #4D98FF;
      margin-top: 3px;
      margin-bottom: 6px;
    }
    .unit {
      font-size: 14px;
    }
    .percent-title {
      font-size: 12px;
      color: #999;
    }
    .percent {
      padding-left: 8px;
    }
    .up {
      color: #FF6024;
    }
    .down {
      color: #40BB3F;
    }
    img {
      width: 11px;
    }
  }
}
</style>
